{include file="../../../application/admin/view_new/public/head" /}
<div class="page-container p10">

    <div class="my-toolbar-box">

        <div class="mb-2">
            <form class="layui-form space-x-1 space-y-1" method="post" action="{:url('data')}">
                <input type="hidden" value="{$param.select|mac_filter_xss}" name="select">
                <input type="hidden" value="{$param.input|mac_filter_xss}" name="input">
                <div class="layui-input-inline w150">
                    <select name="type">
                        <option value="">{:lang('select_type')}</option>
                        {volist name="type_tree" id="vo"}
                        {if condition="$vo.type_mid eq 11"}
                        <option value="{$vo.type_id}" {if condition="$param['type'] eq $vo.type_id"}selected {/if}>{$vo.type_name}</option>
                        {volist name="vo.child" id="ch"}
                        <option value="{$ch.type_id}" {if condition="$param['type'] eq $ch.type_id"}selected {/if}>&nbsp;&nbsp;&nbsp;&nbsp;├&nbsp;{$ch.type_name}</option>
                        {/volist}
                        {/if}
                        {/volist}
                    </select>
                </div>
                <div class="layui-input-inline w150">
                    <select name="status">
                        <option value="">{:lang('select_status')}</option>
                        <option value="0" {if condition="$param['status'] eq '0'"}selected {/if}>{:lang('reviewed_not')}</option>
                        <option value="1" {if condition="$param['status'] eq '1'"}selected {/if}>{:lang('reviewed')}</option>
                    </select>
                </div>
                <div class="layui-input-inline w150">
                    <select name="level">
                        <option value="">{:lang('select_level')}</option>
                        <option value="9" {if condition="$param['level'] eq '9'"}selected {/if}>{:lang('level')}9-{:lang('slide')}</option>
                        <option value="1" {if condition="$param['level'] eq '1'"}selected {/if}>{:lang('level')}1</option>
                        <option value="2" {if condition="$param['level'] eq '2'"}selected {/if}>{:lang('level')}2</option>
                        <option value="3" {if condition="$param['level'] eq '3'"}selected {/if}>{:lang('level')}3</option>
                        <option value="4" {if condition="$param['level'] eq '4'"}selected {/if}>{:lang('level')}4</option>
                        <option value="5" {if condition="$param['level'] eq '5'"}selected {/if}>{:lang('level')}5</option>
                        <option value="6" {if condition="$param['level'] eq '6'"}selected {/if}>{:lang('level')}6</option>
                        <option value="7" {if condition="$param['level'] eq '7'"}selected {/if}>{:lang('level')}7</option>
                        <option value="8" {if condition="$param['level'] eq '8'"}selected {/if}>{:lang('level')}8</option>
                    </select>
                </div>
                <div class="layui-input-inline w150">
                    <select name="lock">
                        <option value="">{:lang('select_lock')}</option>
                        <option value="0" {if condition="$param['lock'] eq '0'"}selected {/if}>{:lang('unlock')}</option>
                        <option value="1" {if condition="$param['lock'] eq '1'"}selected {/if}>{:lang('lock')}</option>
                    </select>
                </div>
                <div class="layui-input-inline w150">
                    <select name="pic">
                        <option value="">{:lang('select_pic')}</option>
                        <option value="1" {if condition="$param['pic'] eq '1'"}selected{/if}>{:lang('pic_empty')}</option>
                        <option value="2" {if condition="$param['pic'] eq '2'"}selected{/if}>{:lang('pic_remote')}</option>
                        <option value="3" {if condition="$param['pic'] eq '3'"}selected{/if}>{:lang('pic_sync_err')}</option>
                    </select>
                </div>
                <div class="layui-input-inline w150">
                    <select name="order">
                        <option value="">{:lang('select_sort')}</option>
                        <option value="website_time" {if condition="$param['order'] eq 'website_time'"}selected{/if}>{:lang('update_time')}</option>
                        <option value="website_id" {if condition="$param['order'] eq 'website_id'"}selected{/if}>{:lang('id')}</option>
                        <option value="website_hits" {if condition="$param['order'] eq 'website_hits'"}selected{/if}>{:lang('hits')}</option>
                        <option value="website_hits_month" {if condition="$param['order'] eq 'website_hits_month'"}selected{/if}>{:lang('hits_month')}</option>
                        <option value="website_hits_week" {if condition="$param['order'] eq 'website_hits_week'"}selected{/if}>{:lang('hits_week')}</option>
                        <option value="website_hits_day" {if condition="$param['order'] eq 'website_hits_day'"}selected{/if}>{:lang('hits_day')}</option>
                    </select>
                </div>

                <div class="layui-input-inline">
                    <input type="text" autocomplete="off" placeholder="{:lang('wd')}" class="layui-input" name="wd" value="{$param['wd']|mac_filter_xss}">
                </div>
                <button class="layui-btn mgl-20 j-search" >{:lang('btn_search')}</button>
            </form>
        </div>

        <div class="flex gap-5 overflow-x-auto overflow-y-hidden">
            <a data-href="{:url('info')}" data-full="1" class="layui-btn layui-btn-primary j-iframe"><i class="layui-icon">&#xe654;</i>{:lang('add')}</a>
            <a data-href="{:url('del')}" class="layui-btn layui-btn-primary j-page-btns confirm"><i class="layui-icon">&#xe640;</i>{:lang('del')}</a>
            <a data-href="{:url('index/select')}?tab=website&col=type_id&tpl=select_type&url=website/field" data-width="100%" data-height="100%" data-checkbox="1" class="layui-btn layui-btn-primary j-select"><i class="layui-icon">&#xe620;</i>{:lang('type')}</a>
            <a data-href="{:url('index/select')}?tab=website&col=website_level&tpl=select_level&url=website/field" data-width="100%" data-height="100%" data-checkbox="1" class="layui-btn layui-btn-primary j-select"><i class="layui-icon">&#xe620;</i>{:lang('level')}</a>
            <a data-href="{:url('index/select')}?tab=website&col=website_hits&tpl=select_hits&url=website/field" data-width="100%" data-height="100%" data-checkbox="1" class="layui-btn layui-btn-primary j-select"><i class="layui-icon">&#xe620;</i>{:lang('hits')}</a>
            <a data-href="{:url('index/select')}?tab=website&col=website_status&tpl=select_status&url=website/field" data-width="100%" data-height="100%" data-checkbox="1" class="layui-btn layui-btn-primary j-select"><i class="layui-icon">&#xe620;</i>{:lang('status')}</a>
            <a data-href="{:url('index/select')}?tab=website&col=website_lock&tpl=select_lock&url=website/field" data-width="100%" data-height="100%" data-checkbox="1" class="layui-btn layui-btn-primary j-select"><i class="layui-icon">&#xe620;</i>{:lang('lock')}</a>
            <a class="layui-btn layui-btn-primary j-iframe" data-href="{:url('images/opt?tab=website')}" href="javascript:;" title="{:lang('pic_sync')}"><i class="layui-icon">&#xe620;</i>{:lang('pic_sync')}</a>
            <a class="layui-btn layui-btn-primary j-iframe" data-checkbox="true" data-href="{:url('make/make?ac=info&tab=website')}" href="javascript:;" title="{:lang('make_page')}"><i class="layui-icon">&#xe620;</i>{:lang('make_page')}</a>
            {if condition="$param.select eq 1"}
            <a data-href="" onclick="parent.onSelectResult('{$param.input|mac_filter_xss}', $('.checkbox-ids:checked'))" class="layui-btn layui-btn-normal">{:lang('select_return')}</a>
            {/if}
            {if condition="$param['repeat'] neq ''"}
            <a data-href="{:url('del')}?repeat=1&retain=min" data-checkbox="no" class="layui-btn layui-btn-primary j-page-btns confirm"><i class="layui-icon">&#xe640;</i>{:lang('del_auto_keep_min')}</a>
            <a data-href="{:url('del')}?repeat=1&retain=max" data-checkbox="no" class="layui-btn layui-btn-primary j-page-btns confirm"><i class="layui-icon">&#xe640;</i>{:lang('del_auto_keep_max')}</a>
            {/if}
        </div>

    </div>


    <form class="layui-form " method="post" id="pageListForm">
        <table class="layui-table" lay-size="sm">
            <thead>
            <tr>
                <th width="25"><input type="checkbox" lay-skin="primary" lay-filter="allChoose"></th>
                <th width="50">{:lang('id')}</th>
                <th >{:lang('name')}</th>
                <th width="350">{:lang('url')}</th>
                <th width="60">{:lang('hits')}</th>
                <th width="60">{:lang('referer')}</th>
                <th width="60">{:lang('level')}</th>
                <th width="60">{:lang('browse')}</th>
                <th width="180">{:lang('update_time')}</th>
                <th width="260">{:lang('opt')}</th>
            </tr>
            </thead>

            {volist name="list" id="vo"}
            <tr>
                <td><input type="checkbox" name="ids[]" value="{$vo.website_id}" class="layui-checkbox checkbox-ids" lay-skin="primary"></td>
                <td>{$vo.website_id}</td>
                <td>[{$vo.type.type_name}] <a target="_blank" class="layui-badge-rim " href="{:mac_url_website_detail($vo)}">{$vo.website_name|htmlspecialchars}</a> {if condition="$vo.website_status eq 0"} <span class="layui-badge">{:lang('reviewed_not')}</span>{/if} {if condition="$vo.website_lock eq 1"} <span class="layui-badge">{:lang('lock')}</span>{/if}</td>
                <td><a class="layui-badge-rim " href="{$vo.website_jumpurl}" target="_blank">{$vo.website_jumpurl}</a></td>
                <td>{$vo.website_hits}</td>
                <td>{$vo.website_referer}</td>
                <td><a data-href="{:url('index/select')}?tab=website&col=website_level&tpl=select_level&url=website/field&ids={$vo.website_id}" data-width="100%" data-height="100%" class=" j-select"><span class="layui-badge layui-bg-orange">{$vo.website_level}</span></a></td>
                <td>{if condition="$vo.ismake eq 1"}<a target="_blank" class="layui-badge layui-bg-green " href="{:mac_url_website_detail($vo)}">Y</a>{else/}<a class="layui-badge" href="{:url('make/make?ac=info&tab=website')}?ids={$vo.website_id}&ref=1">N</a>{/if}</td>
                <td>{$vo.website_time|mac_day='color'}</td>
                <td>
                    <a class="layui-badge-rim j-iframe" data-full="1" data-href="{:url('visit/index?mid=11').'?wd='.parse_url($vo['website_jumpurl'])['host']}" href="javascript:;" title="">{:lang('referer')}</a>
                    <a class="layui-badge-rim j-ajax" data-href="{:url('index/check_back_link')}?url={$vo['website_jumpurl']}" refresh="no" href="javascript:;" title="{:lang('detect')}">{:lang('detect')}</a>
                    <a class="layui-badge-rim j-iframe" data-full="1" data-href="{:url('info?id='.$vo['website_id'])}" href="javascript:;" title="{:lang('edit')}">{:lang('edit')}</a>
                    <a class="layui-badge-rim j-tr-del" data-href="{:url('del?ids='.$vo['website_id'])}" href="javascript:;" title="{:lang('del')}">{:lang('del')}</a>
                </td>
            </tr>
            {/volist}
            </tbody>
        </table>
        <div id="pages" class="center"></div>
    </form>
</div>




{include file="../../../application/admin/view_new/public/foot" /}

<script type="text/javascript">
    var curUrl="{:url('website/data',$param)}";
    layui.use(['laypage', 'layer','form'], function() {
        var laypage = layui.laypage
                , layer = layui.layer,
                form = layui.form;

        laypage.render({
            elem: 'pages'
            ,count: {$total}
            ,limit: {$limit}
            ,curr: {$page}
            ,layout: ['count', 'prev', 'page', 'next', 'limit', 'skip']
            ,jump: function(obj,first){
                if(!first){
                    location.href = curUrl.replace('%7Bpage%7D',obj.curr).replace('%7Blimit%7D',obj.limit);
                }
            }
        });


    });
</script>
</body>
</html>